package com.dbms.controller;

import com.alibaba.fastjson2.JSONObject;
import com.dbms.common.annotation.ResponseResult;
import com.dbms.service.CallbackService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Tag(name = "大模型回调接口", description = "大模型回调接口")
@RestController
@RequestMapping("/call_back")
@RequiredArgsConstructor
public class CallbackController {

    final CallbackService callbackService;

    @Operation(summary = "大模型回调接口", description = "大模型回调接口")
    @PostMapping("/callback")
    public ResponseResult<Boolean> callback(@RequestBody JSONObject jsonObject){
        return ResponseResult.success(callbackService.callback(jsonObject));
    }
}
